# -*- coding: utf-8 -*-
"""
-------------------------------------------------
Project Name: luffcity study project
File Name: 函数对象.py
Author: kij
Create Date: 2021/2/14
-------------------------------------------------
"""


# def func():
# 	print("func方法")
# res = func
# print(res)
# res()

# def logon_in():
# 	print("logon_in")
# def change_password():
# 	print("change_password")
# def register():
# 	print("register")
# def logon_out():
# 	print("logon_out")
#
# func_dict={
# 	'1':logon_in,
# 	'2':change_password,
# 	'3':register,
# 	'4':logon_out,
# }
#
# while True:
# 	choice = input("输入数字显示对应的方法:")
# 	if choice == "0":
# 		break
# 	if choice in func_dict:
# 		func_dict[choice]()


# def max4(a, b, c, d):
# 	res1 = max2(a,b)
# 	res2 = max2(res1,c)
# 	res3 = max2(res2,d)
# 	return res3
#
#
# def max2(a, b):
# 	if a > b:
# 		return a
# 	else:
# 		return b
#
# res = max4(1,2,3,4)
# print(res)

def cycler(radius, action):
	from math import pi
	def area():
		return pi * radius ** 2
	def circumference ():
		return pi * radius * 2

	if action == 0:
		return area()
	if action == 1:
		return circumference()

print(cycler(3,0))
